﻿using Godot;


public class PlayerStateMove(global::Player player, StateMachine stateMachine, AnimatedSprite3D animation3D)
	: PlayerStateGround(player, stateMachine, animation3D)
{
	public override void Enter()
	{
		base.Enter();
		animation.Play(GameConstants.ANIM_Move);
	}
	
	public override void Process(double delta)
	{
		if (player.direction == Vector2.Zero)
		{
			stateMachine.SwitchState(player.idleState);
		}
	}


	public override void PhysicsProcess(double delta)
	{
		base.PhysicsProcess(delta);
		player.AddMovement();
	}

}